<div class="editcate_top">
		    <h2><?php echo $this->lang->line('edit'); ?>:</h2>
		    <a href = "javascript:void(0)" onclick ="reback()"><img src="<?php echo base_url();?>public/admin/img/close.png" class="png" /></a>
</div>

<div id="div_message"></div>
		<form action="<?php echo  admin_url();?>/edit-gallery/<?php echo $info->id; ?>" method="post" id="edit-form" enctype="multipart/form-data">
			<div class="article_ct">
				<div class="btarticle">
			        <input type="submit" value="<?php echo $this->lang->line('save'); ?>" class="btn add-new-page" />
		    	</div>
				<ul class="metatags">
			    	<li>
			        	<span class="left"><b><?php echo $this->lang->line('title'); ?>* : </b></span>
			            <span class="right"><input type="text" name="title" value="<?php echo $info->title;?>" style="width:100%;" id="add-name-page" /></span>
			        </li>
			        <li>
			        	<span class="left"><b><?php echo $this->lang->line('source'); ?>* :</b><i style="font-size: 10px; color:green;">(<?php echo $this->lang->line('required'); ?>: jpg, png, jpeg, gif & <?php echo $this->lang->line('size'); ?> 3MB)</i></span>
			            <span class="right" >
			            	<input type="file" name="image"  value="" style="width: 250px;"/>
			            	<img src="<?php if(file_exists($info->thumb_url)){echo base_url().$info->thumb_url;}else{echo img_link('no_image.gif','admin');}?>" />
			            </span>
			        </li>
		            <li>
		                <span class="left"><b><?php echo $this->lang->line('parent'); ?>* : </b></span>
		                <?php if(count($cate)>0){?>
			                <span class="right">
			                	<select name="category" class="add-order" style="width: 150px;">
			                		<?php foreach ($cate as $k => $v){?>
			                		<option value="<?php echo $v->id;?>" <?php echo ($v->id == $info->cate_id)?"selected":"" ;?>><?php echo $v->name;?></option>
			                		<?php }?>
			                	</select>
			                </span>
		                <?php }?>
		            </li>
			    </ul>
			    <div style="display: none;">
			    	<input type="text" value="<?php echo $info->image_url;?>" name="image_hidden" />
			    	<input type="text" value="<?php echo $info->thumb_url;?>" name="thumb_hidden" />
			    	<input type="text" value="<?php echo $info->cate_id;?>" name="cate_hidden" />
			    </div>
			    <div class="btarticle">
			    	<input type="button" value="<?php echo $this->lang->line('cancel'); ?>" class="btn" onclick="reback()" />
			        <input type="submit" value="<?php echo $this->lang->line('save'); ?>" class="btn add-new-page" />
		    	</div>
			</div>
		</form>
<script type="text/javascript">
$('#edit-form').iframer({
    onComplete: function(msg){
    	if(msg == 'yes') {
    		$('#light_adct').hide();$('#fade_adct').hide();
    		alert('<?php echo $this->lang->line('edit_mess'); ?>');
            window.location	=	'<?php echo $current_url;?>';
    	}
    	else show_error('div_message', msg)
    }
});
function reback(){
	$('#light_adct').hide();$('#fade_adct').hide();
	window.location = '<?php echo $current_url;?>';
}
</script>